package com.fenxiangle.yueding.feature.focus.view.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.fenxiangle.yueding.R;
import com.fenxiangle.yueding.entity.CertificationType;
import com.fenxiangle.yueding.entity.bo.DemandManageBo;
import com.fenxiangle.yueding.entity.bo.TeamBo;
import com.scwang.smartrefresh.header.material.CircleImageView;
import com.suozhang.framework.framework.AM;

import java.util.List;

/**
 * Created by Home on 2018/9/6.
 */

public class DemandManageAdapter extends BaseQuickAdapter<TeamBo, BaseViewHolder> {
    public DemandManageAdapter() {
        super(R.layout.item_demand_manage);
    }

    @Override
    protected void convert(BaseViewHolder helper, TeamBo item) {
        helper.setText(R.id.tv_level_name, item.getUserName())
                .setText(R.id.tv_level_id, "ID:" + item.getUserUid())
                .setText(R.id.tv_level_member, CertificationType.getName(item.getMembershipLevel()))
                .setTextColor(R.id.tv_level_member,item.getMembershipLevel()==0?AM.res().getColor(R.color.primary_comparison):AM.res().getColor(R.color.text_remind_3))
                .addOnClickListener(R.id.iv_level_head)
        ;
        AM.image().bindToCircleObject(item.getUserHead(),helper.getView(R.id.iv_level_head));
    }
}
